1. Field of the Invention
This invention generally relates to a television system and more particularly to a motion compensated prediction interframe system for performing motion compensated prediction interframe coding of television signals.
2. Description of the Related Art
Recently, with advance in techniques of moving picture coding, a motion compensated prediction interframe coding system has been developed as an efficient coding system for effecting an efficient coding of a color moving picture for use in a visual telephone (or video telephone), a video conference system, CD ROM, a digital video tape recorder (VTR) and so on. An example of a motion compensated prediction interframe coding system is described in T. Fukinuki: Multidimensional Signal Processing of TV Picture, Nikkan Kogyo Shinbun Company, Chapter 7 "Efficient Coding", pp. 213-291 (1988. 11. 15).
When a large quantity of prediction error signals is generated, the motion compensated prediction interframe coding system limits an amount of codes of the generated prediction error signals by employing a large step size for quantization (hereunder sometimes referred to as a quantization step size) in such a way that at the coding of a picture can be achieved a constant frame rate. An example of a conventional method of determining a step size for quantization is disclosed in CCITT (Comite Consultatif Internationale Telegraphique et Telephinque) SGXV Document #525: Description of Ref. Model 8 (RM 8), Working Party XV/4 Specialist Group on Coding for Visual Telephony (1989. 6. 9).
Hereinafter, a prior art motion compensated prediction interframe coding system will be describe by referring to FIG. 1.
In this figure, reference numeral 51 represents an input terminal from which television signals are inputted to the system; 53 a motion vector calculating portion for comparing a picture signal of a block (hereunder referred to as a coding block), which is to be coded, of a current frame with a reproduced picture signal of a previous frame and calculating a motion vector; 54 a picture memory portion for storing reproduced picture signals of a current and previous frames; 58 a motion compensation predicting portion for performing a motion compensation predicting of the reproduced picture signals of the pervious frame; 60 a coding method selection portion for selecting a method of coding of a block from an interframe coding and intraframe coding methods; 62 an intra-loop filter portion for performing two-dimensional lowpass filtering processing of a motion compensation predicting signal; 64 a prediction error evaluating portion for evaluating a prediction error by computing the difference between an original picture signal and a predictive signal of a coding block; 66 a switch portion for selecting a signal, of which an orthogonal transform is effected, in accordance with a coding method selecting signal and further selecting a signal from which a reproduced picture is calculated; 68 an orthogonal transform portion for performing an orthogonal transform of the selected signal; 70 a quantization portion for quantizing coefficients of an orthogonal transform (hereunder referred to as orthogonal transform coefficients) of the selected signal; 73 a quantization step-size computing portion for computing a step size for the quantization; 74 a code memory portion for temporarily storing a transmission frame; 76 an inverse orthogonal transform portion for effecting an inverse orthogonal transform of the quantized coefficients of the orthogonal transform; 78 a reproduced picture calculating portion for calculating a reproduced picture of a current frame; 82 a prediction error coding portion for performing what is called "transmitting channel coding" of a prediction error; 84 a motion vector coding portion for performing the transmitting channel coding of a motion vector; 86 a multiplexer portion for computing a transmitting frame on the basis of the prediction code and the motion vector; and 89 an output terminal from which a transmission signal is output.
Hereinafter, an operation of the prior art motion compensated prediction interframe coding system having the above described arrangement will be described.
First, television signals are converted into digital television signals by an analog-to-digital (A/D) conversion circuit (not shown). Then, pixels represented by the digital television signals are divided into blocks each of which is a rectangular array composed of M.times.N pixels arranged in M columns and N rows. Further, the digital television signals are input to the system from the input terminal 51 as input television signals 52. Then, the motion vector calculating portion 53 compares the input television signal with a reproduced picture signal 55 of a previous frame stored in the picture memory portion 54 and calculating the motion of a coding block as a motion vector and moreover outputs a motion vector signal 56 representing the motion vector. Simultaneously, the motion vector calculating portion 53 judges from the result of the evaluation of the motion vector whether the motion compensation made with respect to the coding block is effective or ineffective. Further, the motion vector calculating portion 53 outputs a motion compensation control signal which represents the result of the judgement and is superposed on the motion vector signal 56.
The motion compensation prediction portion 58 performs a motion compensation prediction of the reproduced television signal 55 of a previous frame in case where the motion compensation control signal indicates that the motion compensation prediction is effective and outputs the reproduced television signal without change as a motion compensation prediction signal 59 in case where the motion compensation control signal indicates that the motion compensation prediction is ineffective.
The coding method selection portion 60 compares the input television signal 52 with the motion compensation prediction signal 59 every block and judges whether or not the motion compensation prediction is effective. Further, the coding method selection portion 60 judges that an intraframe coding method is effective for a current block in question in case where the motion compensation prediction is effective and that an interframe coding method is effective for a current block in question in case where the motion compensation prediction is not effective, and outputs a coding method selection signal 61 representing the result of this judgement. In this way, a coding method to be used in coding each block may be changed from the intraframe coding method to the interframe coding method and vice versa. This can make the following improvements on another conventional system which employs only the interframe coding method:
(1) Picture quality can be improved after a scene is changed because the intraframe coding method is employed when the scene is changed.
(2) Picture quality can be also improved when a moving body largely moves because a background which has hid itself behind the moving body emerges from behind it and in such a case, the intraframe coding is employed.
Incidentally, in case of a coding method employed in storage type media such as CD ROM, it is necessary to insert a frame of which all blocks are coded by performing the intraframe coding method (hereunder referred to as a refreshment frame) between frames every constant frame period in order to realize an editing function and a backward editing function of a reproduced picture. Further, the insertion of the refreshment frame can be achieved by providing the motion compensation prediction interframe coding system with the intraframe coding function.
Then, the intra-loop filtering portion 62 performs the two-dimensional lowpass filtering processing of a coding block of which the motion compensation prediction is effected by using the motion vector and further outputs a prediction signal 63. Subsequently, the prediction error evaluating portion 64 evaluates the difference between the input television signal 52 and the prediction signal 63 of the coding block and outputs a prediction error signal 53 representing the evaluated difference.
Thereafter, in case where the coding method selection signal 61 indicates that the intraframe coding method is selected, the switching portion 66 selects the input television 52 as a signal 67 to be transformed by performing the orthogonal transform. In contrast, in case where the coding method selection signal 61 indicates that the interframe coding method is selected, the switching portion 66 selects the prediction error 65 as a signal 67.
Further, the orthogonal transform portion 68 performs the orthogonal transform of the signal 67 to remove therefrom effects of the high-degree correlation between each pair of the neighbors of a pixel corresponding to the signal 67 and further outputs orthogonal transform coefficients 69. At that time, a discrete cosine transform (DCT), which has a high efficiency of transform and of which firmware may be realized, is usually employed as the orthogonal transform.
Then, the quantization portion 70 quantizes the prediction error orthogonal transform coefficients 69 and outputs orthogonal transform quantization coefficients 72.
The quantization step-size computing portion 73 calculates the quantization step size 71 from an amount 75 of codes remained in the code memory 74 in accordance with a method as will be described below.
The method of calculating the quantization step size 71 used in this prior art system will be described in detail hereinbelow.
In this prior art system, a picture represented by the input television signal is composed of 352 columns and 288 rows (i.e., 352 pixels in each row and 288 lines in the vertical direction) and is divided into blocks each of which is referred to as a Macro Block and is composed of 16 columns and 16 rows (i.e., 16 pixels in each row and 16 lines in the vertical direction), as illustrated in FIG. 2. The quantization step size Qb is calculated from the following equation (1) at regular intervals on n Macro Blocks (n is a predetermined positive integer) when the quantization is effected. EQU Qb=2.times.INT[B.div.200q]+2 (1)
where (a) INT[*] is defined as a function of rounding a part after the decimal point of an argument * down (e.g., INT[1.5]=1, INT[1.3]=1, INT[1.6]=1), (b) Bcont represents the amount of the code remained in the code memory portion 74 and (c) q represents a coding rate parameter defined by the equation (2) using the coding rate V: EQU V=q.times.64K bits/second (2)
(e.g., q=1 if V=64K bits/second).
As is apparent from the equation (1), when the amount of the remained code Bcont increases, the quantization step size Qb also increases so as to limit an amount of generated codes and achieve the coding of video signals at a constant frame rate. For instance, if the amount of the remained code Bcont=700 bits, the quantization step size Qb=8. Further, if the amount of the remained code Bcont=6100 bits, the quantization step size Qb=62. Incidentally, the quantization is performed by using a predetermined quantization step size Qb with respect to a first Macro Block to a (n-1)th Macro Block. For example, the Qb is set to be 32 in case where V=64K bits/sec. and q=1.
In this prior art system, the value of n representing an interval of the calculations of the quantization step size is set to be 12.
The inverse orthogonal transform portion 76 performs the inverse orthogonal transform of the orthogonal transform quantization coefficients 72 and outputs a quantization-error-containing orthogonal transform signal 77 representing the result of the inverse orthogonal transform.
Further, the switching portion 66 selects a numerical-value-zero signal 80 as a reproduced picture calculating signal 79 in case where the coding method selection signal 61 selects the intraframe coding method. In contrast, the switching portion 66 selects the prediction signal 63 as the reproduced picture calculating signal 79 in case where the coding method selection signal 61 selects the interframe coding method.
Then, the reproduced picture calculating portion 78 adds the reproduced picture calculating signal 79 and the quantization-error-containing orthogonal transform signal 77 and outputs a reproduced picture signal 81 representing a reproduced picture of the coding block. Further, the picture memory 44 stores the reproduced picture signal 81 of the current frame and outputs the reproduced television signal (hereunder sometimes referred to as the reproduced picture signal) 55 of the previous frame. Moreover, the prediction error coding portion 82 performs the coding of the orthogonal transform quantization coefficients 72, a signal indicating the quantization step size 71 and the coding method selection signal 61 and outputs a prediction error code 83. Incidentally, the coding of the quantization step size 71 is performed only when the quantization step size 71 changes, namely, is performed only once every n Marco Blocks.
Furthermore, the motion vector coding portion 84 performs the coding of the motion vector signal 56 and calculates a motion vector code 85. Thereafter, the multiplexer portion 86 calculates a transmission frame 87, which has a predetermined format, from the prediction error code 83 and the motion vector 85. Subsequently, the code memory portion 74 stores the transmission frame 87 once and further outputs the transmission frame 87 from the output terminal 89 in synchronization with a clock signal, which is inputted from an external circuit (not shown), as a transmission code 88. Simultaneously, the code memory portion 74 calculates an amount of codes remained therein and outputs a signal indicating the calculated amount of the remained codes.
However, in this prior art system constructed as above described, the quantization step size Qb is fixed during an interval of blocks (n blocks (i.e., n Marco Blocks) in case of this prior art system) at which the calculation of the quantization step size is calculated.
That is, prediction errors are quantized by using the same quantization step size Qb during the continuous n blocks independently of characteristics of the input television signals. More particularly, during the interval at which the calculation of the quantization is calculated, of the continuous blocks, a block having a fine pattern or texture and another block having a coarse pattern are quantized by using the same quantization step size Qb. Thus, the prior art system has a first drawback that the picture quality of the block having a fine patter is degraded, namely, what is called a "block distortion", which is a phenomenon that the block loses the fineness of the pattern thereof and comes to have a flat pattern, occurs due to the quantization of a prediction error generated from the block having a fine pattern and is visually perceived as degradation in picture quality.
Further, similarly, the quantized orthogonal transform coefficients are quantized by using the same quantization step size Qb during the continuous n blocks independently of characteristics of the input television signals. That is during the interval at which the calculation of the quantization is calculated, of the continuous blocks, a block having a fine pattern, which should be coded by using the interframe coding method, and another block having a coarse pattern are quantized by using the same quantization step size Qb. Thus, the prior art system has another similar drawback (hereunder referred to as a second drawback) that the picture quality of the block, which should be coded by the interframe coding method, having a fine patter is degraded, namely, the "block distortion" occurs due to the quantization of orthogonal transform coefficients generated from the block having a fine pattern and is visually perceived as degradation in picture quality.
On the other hand, in order to reduce the amount of the codes generated by coding the quantization step size, the number of the continuous blocks quantized by using the same quantization step size needs to be more than a predetermined number, which is n in case of the above described prior art system. Thus, practically, it is not possible that the quantization step size is calculated or changed every block. The present invention is created to obviate the above described drawbacks of the prior art system.